package com.yhd.mediator;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author yhd
 * @email yinhuidong1@xiaomi.com
 * @description TODO
 * @since 2021/5/22 上午1:14
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class Mm {

    private boolean flag;

    public void yuehui(String event){
        if ("toHappy".equals(event)){
            if (flag){
                System.out.println("约会成功");
                flag=false;
            }else {
                System.out.println("约会失败");
            }
        }else if ("goHome".equals(event)){
            if (!flag){
                System.out.println("拔掉无情");
                flag=true;
            }else {

            }
        }
    }
}
